package mapping

import (
	"maya-service/model"
	"maya-service/model/entity"
)

// SupervisorWithDrawsEntityToDto entity data transfer
func SupervisorWithDrawsEntityToDto(supervisorWithDraws []*entity.SupervisorWithDraw) []*model.SupervisorWithDrawInfo {
	out := make([]*model.SupervisorWithDrawInfo, 0, len(supervisorWithDraws))
	for _, c := range supervisorWithDraws {
		out = append(out, SupervisorWithDrawEntityToDto(c))
	}
	return out
}

// SupervisorWithDrawEntityToDto entity data transfer
func SupervisorWithDrawEntityToDto(e *entity.SupervisorWithDraw) *model.SupervisorWithDrawInfo {
	return &model.SupervisorWithDrawInfo{

		Id: e.Id,

		SupervisorId: e.SupervisorId,

		SupervisorName: e.SupervisorName,

		ItemList: e.ItemList,

		OrderCount: e.OrderCount,

		TotalAmount: e.TotalAmount,

		DeductAmount: e.DeductAmount,

		OperatorId: e.OperatorId,
		Operator:   e.Operator,

		Desc: e.Desc,

		Status: e.Status,

		CreatedAt: e.CreatedAt,

		UpdatedAt: e.UpdatedAt,
	}
}
